package com.chen.blue.service.system;

import com.chen.blue.domain.delete.system.MenuDelete;
import com.chen.blue.domain.delete.system.RoleDelete;
import com.chen.blue.domain.dto.system.*;
import com.chen.blue.domain.dto.system.update.MenuAllDtoEdit;
import com.chen.blue.domain.dto.system.update.MenuButtonDtoEdit;
import com.chen.blue.domain.dto.system.update.MenuDirectoryDtoEdit;
import com.chen.blue.domain.dto.system.update.RoleDtoEdit;
import com.chen.blue.domain.model.system.MenuModel;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chen.blue.domain.query.system.MenuQuery;
import com.chen.blue.domain.query.system.RoleQuery;
import com.chen.blue.domain.vo.router.RouterVo;
import com.chen.blue.domain.vo.system.MenuVo;
import com.chen.blue.domain.vo.system.RoleVo;
import com.chen.blue.exception.e.DtoNullException;
import com.chen.blue.exception.e.NoDeleteException;
import com.chen.blue.result.DataResult;

import java.util.List;

/**
 * <p>
 * 菜单权限表 服务类
 * </p>
 *
 * @author CLT
 * @since 2024-04-29
 */
public interface IMenuService extends IService<MenuModel> {


    /**
     * 添加菜单
     *
     * @param menuAllDto
     * @return
     * @throws DtoNullException
     */
    boolean addMenu(MenuAllDto menuAllDto) throws DtoNullException;

    /**
     * 删除菜单
     *
     * @param menuDelete
     * @return
     * @throws DtoNullException
     */
    boolean deleteMenu(MenuDelete menuDelete) throws DtoNullException;

    /**
     * 更新菜单
     *
     * @param menuAllDtoEdit
     * @return
     * @throws DtoNullException
     */
    boolean updateMenuById(MenuAllDtoEdit menuAllDtoEdit) throws DtoNullException;

    /**
     * 多条件查询菜单
     *
     * @param menuQuery
     * @param isTree    是否返回树形结构
     * @return
     * @throws DtoNullException
     */
    DataResult<List<MenuVo>> queryMenu(MenuQuery menuQuery, boolean isTree) throws DtoNullException;

    /**
     * id查询菜单
     *
     * @param id
     * @return
     * @throws DtoNullException
     */
    DataResult<List<MenuVo>> queryMenuById(Long id) throws DtoNullException;

    /**
     * 获取路由
     *
     * @param menuModelList
     * @return
     */
    DataResult<List<RouterVo>> queryRouter() throws DtoNullException;


}
